package com.molichuxing.services.property;

/**
 * 过户费枚举
 * @author xuelin yi
 */
public enum GoodsTransferFeeEnum {

  ALL((byte)0, "10"),BUY_BACK((byte)1, "10"),NO_BUY_BACK((byte)2, "15000");

  byte value;
  String name;

  GoodsTransferFeeEnum(byte value, String name) {
    this.value = value;
    this.name = name;
  }

  public byte getValue() {
    return value;
  }

  public String getName() {
    return name;
  }

  /**
   * 通过value获取枚举的name
   * @param value
   * @return
   */
  public static GoodsTransferFeeEnum getName(byte value) {
    for (GoodsTransferFeeEnum orderSource : GoodsTransferFeeEnum.values()) {
      if (orderSource.getValue() == value) {
        return orderSource;
      }
    }
    return null;
  }
}
